var app = getApp();

Page({
    data: {},
    onLoad: function(t) {
        console.log(t), app.setNavigationBarColor(this);
        var n = this, a = t.scene;
        app.getUserInfo(function(t) {
            console.log(t);
            var o = t.id;
            n.setData({
                user_id: o,
                hx_id: a
            });
        });
    },
    add_market: function(t) {
        var o = this.data.hx_id, n = this.data.user_id;
        app.util.request({
            url: "entry/wxapp/AddVerification",
            cachetime: "0",
            data: {
                user_id: o,
                hx_id: n
            },
            success: function(t) {
                console.log(t), 1 == t.data ? wx.showToast({
                    title: "添加成功"
                }) : wx.showToast({
                    title: t.data
                }), setTimeout(function() {
                    wx.redirectTo({
                        url: "../index/index"
                    });
                }, 1500);
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});